package com.cl.util;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;

public class AppDateTag extends TagSupport{

	private static final long serialVersionUID = 4512241072079966773L;
	private String dateStr;
	
	@Override
	public int doEndTag() throws JspException {
		try {
			JspWriter writer = pageContext.getOut();
			writer.print(DateTimeUtils.format(dateStr, 1));
		} catch (Exception e) {
			e.printStackTrace();
		}
		return EVAL_PAGE;
	}

	public String getDateStr() {
		return dateStr;
	}

	public void setDateStr(String dateStr) {
		this.dateStr = dateStr;
	}
}
